<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>图书添加和修改</title>
    <base href="http://localhost:8080/bookstore/">
    <link href="https:/cdn.staticfile.org/layui/2.8.0/css/layui.css" rel="stylesheet">
    <script src="static/script/layui.js"></script>
    <link rel="stylesheet" href="static/style/layui.css">
    <script src="static/script/vue.js"></script>
    <script src="static/script/axios-0.18.0.js"></script>
    <link rel="stylesheet" href="static/style/bootstrap.min.css">
    <link rel="stylesheet" href="static/style/purecss.css">
    <link rel="stylesheet" href="static/style/prism.css">
    <link rel="stylesheet" href="static/style/bulma.css">
    <link rel="stylesheet" href="https://rsms.me/inter/inter.css">
    <link rel="stylesheet" href="element-ui-2.13.0/lib/theme-chalk/index.css">
    <script src="element-ui-2.13.0/lib/index.js"></script>
</head>
<body>
<div id="app">
    <el-button type="text" @click="dialogVisible = true" v-bind:edit>点击打开 Dialog</el-button>
    <el-dialog
            title="提示"
            :visible.sync="dialogVisible"
            width="30%"
            :before-close="handleClose">
        <div>
            <div style="margin: 20px;"></div>
            <el-form :label-position="labelPosition" label-width="100px" label  :model="formLabelAlign">
                <el-form-item label="用户名">
                    <el-input v-model="formLabelAlign.username" style="height: 40px"></el-input>
                </el-form-item>
                <el-form-item label="密码">
                    <el-input v-model="formLabelAlign.password" style="height: 40px"></el-input>
                </el-form-item>
                <el-form-item label="邮箱">
                    <el-input v-model="formLabelAlign.email" style="height: 40px" datatype="email"></el-input>
                </el-form-item>
            </el-form>
        </div>
        <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  </span>
    </el-dialog>
</div>
<script>
    new Vue({
        el:"#app",
        data(){
            return {
                dialogVisible: false,
                labelPosition: 'top',
                formLabelAlign: {
                    username: '',
                    password: '',
                    email: ''
                }
            }
        },
        methods: {
            handleClose(done) {
                this.$confirm('确认关闭？')
                    .then(_ => {
                        done();
                    })
                    .catch(_ => {});
            }
        }
    })
</script>
</body>
</html>